<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>
<title>Windows Interface Reference: Button structure</title>
</head>

<body>

<h1>Button</h1>

<p>The Button structure contains the styles, notifications and state values concerned with
button controls.&nbsp; Buttons are windows like any other and can be constructed using
CreateWindow although more usually they form part of a dialogue box.&nbsp; The values from
the Notification substructure are sent as the <em>code</em> parameter in a <a
href="Message.html#WM_NOTIFY">WM_NOTIFY</a> message.&nbsp; Specialised button messages
begin with <a href="Message.html#Button">BM_</a>. The values in the State substructure may
be sent or returned in messages such as BM_GETCHECK and BM_SETSTATE.</p>

<pre>structure Button:
sig
    structure Style:
    sig
	include BIT_FLAGS where type flags = Window.Style.flags
	val WS_OVERLAPPED: flags and WS_POPUP: flags and WS_CHILD: flags and WS_MINIMIZE: flags
	and WS_VISIBLE: flags and WS_DISABLED:flags and WS_CLIPSIBLINGS:flags
	and WS_CLIPCHILDREN:flags and WS_MAXIMIZE:flags and WS_CAPTION:flags
	and WS_BORDER:flags and WS_DLGFRAME:flags and WS_VSCROLL:flags and WS_HSCROLL:flags
	and WS_SYSMENU:flags and WS_THICKFRAME:flags and WS_GROUP:flags and WS_TABSTOP:flags
	and WS_MINIMIZEBOX:flags and WS_MAXIMIZEBOX:flags and WS_TILED:flags and WS_ICONIC:flags
	and WS_SIZEBOX:flags and WS_OVERLAPPEDWINDOW:flags and WS_TILEDWINDOW:flags
	and WS_POPUPWINDOW:flags and WS_CHILDWINDOW:flags
        and BS_3STATE: flags and BS_AUTO3STATE: flags and BS_AUTOCHECKBOX: flags
	and BS_AUTORADIOBUTTON: flags and BS_BITMAP: flags and BS_BOTTOM: flags
        and BS_CENTER: flags and BS_CHECKBOX: flags and BS_DEFPUSHBUTTON: flags
        and BS_FLAT: flags and BS_GROUPBOX: flags and BS_ICON: flags and BS_LEFT: flags
        and BS_LEFTTEXT: flags and BS_MULTILINE: flags and BS_NOTIFY: flags
        and BS_OWNERDRAW: flags and BS_PUSHBUTTON: flags and BS_PUSHLIKE: flags
        and BS_RADIOBUTTON: flags and BS_RIGHT: flags and BS_RIGHTBUTTON: flags
        and BS_TEXT: flags and BS_TOP: flags and BS_USERBUTTON: flags and BS_VCENTER: flags
    end

    structure Notifications:
    sig
	val BN_CLICKED: int
	val BN_PAINT: int
	val BN_HILITE: int
	val BN_UNHILITE: int
	val BN_DISABLE: int
	val BN_DOUBLECLICKED: int
	val BN_PUSHED: int
	val BN_UNPUSHED: int
	val BN_DBLCLK: int
	val BN_SETFOCUS: int
	val BN_KILLFOCUS: int
    end

    structure State:
    sig
	val BST_UNCHECKED: int
	val BST_CHECKED: int
	val BST_INDETERMINATE: int
	val BST_PUSHED: int
	val BST_FOCUS: int
    end
end</pre>
</body>
</html>
